<template>
  <div
    v-for="reply in props.replyList"
    :key="reply.commentId"
    class="reply_item_content"
  >
    <ReplyItem
      :likesIds="props.likesIds"
      :noLike="
        props.commentDetail.likeSwitch === 'N' ||
        !props.commentDetail.likeSwitch
      "
      :reply="reply"
      :userInfo="props.userInfo"
      @handleReply="handleReply"
    />
    <!-- 子评论 -->
    <!-- <div class="child_reply mt10" v-if="reply.child">
      <commentReplyItem :replyList="reply.child" @handleReply="handleReply"/>
      <label class="show_more" @click="jumpReplyDetail(reply)"><span class="pr05">共3条回复</span>
        <van-icon name="arrow" />
      </label>
    </div> -->
  </div>
</template>
<script>
export default {
  name: "ReplyList"
};
</script>

<script setup>
import ReplyItem from "./replyItem.vue";

const props = defineProps([
  "replyList",
  "commentDetail",
  "userInfo",
  "likesIds"
]);
const emit = defineEmits(["handleReply", "jumpReplyDetail"]);
// 回复
const handleReply = (reply) => emit("handleReply", reply);
</script>

<style scoped>
.reply_item_content {
  padding: 0.8rem;
}

</style>
